/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.giant.util;

import java.util.Date;

/**
 *
 * @author Harold
 */
public class DateTools {
    
    /**
     * Return the given date in a string with the format yyyy-mm-dd
     */
    public String dateToString(Date date)
    {
        String dateStr="";
        int year=date.getYear()+1900;
        int month=date.getMonth()+1;
        int day= date.getDate();
        dateStr=year+"-"+month+"-"+day;
        
        return dateStr;
    }
    
}
